<template>
	<div ref="gauge" class="gauge" style="width: 400px; height: 300px;"></div>
</template>
<script>
import * as echarts from 'echarts'
export default {
	name: "chart-gauge",
	data() {
		return {}
	},
	mounted() {
		this.draw()
	},
	methods: {
		draw() {
			let option = {
				tooltip: {
					formatter: '{a} <br/>{b} : {c}%'
				},
				series: [
					{
						name: 'Pressure',
						type: 'gauge',
						detail: {
							formatter: '{value}'
						},
						data: [
							{
								value: 50,
								name: 'SCORE'
							}
						]
					}
				]
			};
			let myChart = echarts.init(this.$refs.gauge);
			myChart.setOption(option);
		}
	}
}
</script>

<style scoped>

</style>